package xyz.xtt.client.starter;

import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import xyz.xtt.client.starter.cache.CacheManager;
import xyz.xtt.client.starter.lock.RedisLock;

@Configuration
public class AutoConfiguration {

//	@Bean
//	public LettuceConnectionFactory redisConnectionFactory() {
//		return new LettuceConnectionFactory();
//	}

	@ConditionalOnMissingBean
	@Bean
	public CacheManager cacheManager() {
		return new CacheManager();
	}

	@ConditionalOnMissingBean
	@Bean
	public RedisLock redisLock() {
		return new RedisLock();
	}
}
